﻿using System.Linq;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.InsuranceProducts;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IInsuranceProductPackageService
    {
        InsuranceProductPackage LoadByID(long id, bool isAvailable=true);
        /// <summary>
        /// 根据保险卡iD 和保险卡名称判断是否存在
        /// </summary>
        /// <param name="productPackageName">保险卡名称</param>
        /// <param name="id">保险卡iD </param>
        /// <returns></returns>
        bool IsExist(string productPackageName, int id = 0);
        /// <summary>
        /// 禁用
        /// </summary>
        /// <param name="id"></param>
        /// <param name="available"></param>
        /// <returns></returns>
        bool UpdateAvailable(int id, bool available = false);
        IQueryable<InsuranceProductPackage> GetPagingList(InsuranceProductPackageModel model, out int total);
    }
}